#include <stdio.h>
#include <string.h>
#include "lcd.h"
#include "draw.h"
#include "char.h"

int main()
{
  int color;
  char *ascs = "Hello, world!";
  char *hzks = "呵呵！";
  char gb[256];
  char *p;
  int x, y;

  fb_Init();
  color = fb_MakeColor(0x1f, 0, 0x1f);
  fb_DrawLine(0, 0, 640, 480, color);

  x = 300; y = 300;
  for (p = ascs; *p; p++){
    fb_DrawASC(x, y, *p, color);
    x += 8;
  }

  u2g(hzks, strlen(hzks), gb, 256);
  x = 300; y = 350;
  for (p = gb; *p; p += 2){
    fb_DrawHZK(x, y, *(short *)p, color);
    x += 16;
  }

  fb_Release();

  return 0;
}
